package com.bdjk.bdmw.InfoGath.common.service;

import com.bdjk.bdmw.InfoGath.common.dao.impl.JdbcDAOImpl;
import com.bdjk.bdmw.InfoGath.common.model.LBSModel;
import com.bdjk.bdmw.InfoGath.exception.BusinessException;
import java.util.ArrayList;
import java.util.List;

public class LBStestImpl
  extends JdbcDAOImpl
{
  LBSModel model;
  
  public LBStestImpl(LBSModel model)
  {
    this.model = model;
  }
  
  public void save()
  {
    StringBuffer sql = new StringBuffer();
    sql.append("insert into lbs_test (lac,cid,lat,lon,mnc,t_mnc)values(?,?,?,?,?,?)");
    List<Object> params = new ArrayList();
    params.add(Long.valueOf(this.model.getLacId()));
    params.add(Long.valueOf(this.model.getCellId()));
    params.add(Double.valueOf(this.model.getLatitude()));
    params.add(Double.valueOf(this.model.getLongitude()));
    params.add(Long.valueOf(this.model.getMnc()));
    params.add(Long.valueOf(this.model.getT_mnc()));
    int positionId = 0;
    try
    {
      positionId = executeSQL(sql.toString(), params);
    }
    catch (BusinessException e)
    {
      e.printStackTrace();
    }
  }
}
